//
// Created by yasin on 2024/9/7.
//

#include "json_helper.h"

#include "thirdparty/nlohmann/json.hpp"

namespace ohosrtc::json_helper {

std::string MapToJson(const std::unordered_map<std::string, std::string> &map) {
  nlohmann::json json = nlohmann::json::object();
    auto it = map.begin();
  while (it != map.end()) {
    json[it->first] = it->second;
    it++;
  }

  return json.dump();
}

}